package com.light.gulimall.ware.dto;

import java.util.List;
import java.util.Objects;

/**
 * 合并采购需求 DTO类
 */
public class PurchaseMergeDTO {

    /**
     * 整单id
     */
    private Long purchaseId;

    /**
     * 合并项集合
     */
    private List<Long> items;


    public PurchaseMergeDTO() {
    }

    public PurchaseMergeDTO(Long purchaseId, List<Long> items) {
        this.purchaseId = purchaseId;
        this.items = items;
    }

    /**
     * 获取
     * @return purchaseId
     */
    public Long getPurchaseId() {
        return purchaseId;
    }

    /**
     * 设置
     * @param purchaseId
     */
    public void setPurchaseId(Long purchaseId) {
        this.purchaseId = purchaseId;
    }

    /**
     * 获取
     * @return items
     */
    public List<Long> getItems() {
        return items;
    }

    /**
     * 设置
     * @param items
     */
    public void setItems(List<Long> items) {
        this.items = items;
    }

    public String toString() {
        return "PurchaseMergeDTO{purchaseId = " + purchaseId + ", items = " + items + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PurchaseMergeDTO that = (PurchaseMergeDTO) o;
        return Objects.equals(purchaseId, that.purchaseId) && Objects.equals(items, that.items);
    }

    @Override
    public int hashCode() {
        return Objects.hash(purchaseId, items);
    }
}
